@import './common/var.css';

.van-sku {
  &-container {
    background: $background-color;
  }

  &-layout {
    background: $white;
  }

  &-body {
    max-height: 350px;
    overflow-y: scroll;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  &-group-container {
    margin-left: 15px;
    padding: 12px 0 2px;
  }

  &-row-group {
    margin: 0 15px 10px 0;

    &:last-child {
      margin-bottom: 0;
    }
  }

  /* sku header */
  &-header {
    margin-left: 15px;

    &__img-wrap {
      position: relative;
      float: left;
      margin-top: -10px;
      width: 80px;
      height: 80px;
      background: $background-color;
      border-radius: 2px;

      .van-sku__goods-img {
        position: absolute;
        margin: auto;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100%;
        max-height: 100%;
      }
    }

    &__goods-info {
      padding: 10px 60px 10px 10px;
      min-height: 82px;
      overflow: hidden;
      box-sizing: border-box;
    }
  }

  &__goods-name {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__price-symbol {
    font-size: 14px;
    vertical-align: middle;
  }

  &__price-num {
    vertical-align: middle;
  }

  &__goods-price {
    color: $red;
    margin-top: 10px;
    font-size: 16px;
    vertical-align: middle;
  }

  &__close-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    background: url();
    background-size: 22px 22px;
    background-repeat: no-repeat;
    background-position: 7px 10px;
  }

  /* sku row */
  &-row {
    &__title {
      font-size: 14px;
      padding-bottom: 10px;
    }

    &__item {
      display: inline-block;
      padding: 5px 9px;
      margin: 0 10px 10px 0;
      height: 28px;
      min-width: 52px;
      line-height: 16px;
      font-size: 12px;
      color: $text-color;
      text-align: center;
      border: 1px solid $gray-dark;
      border-radius: 3px;
      box-sizing: border-box;

      &.van-sku-row__item--active {
        color: $white;
        border-color: $red;
        background: $red;
      }

      &.van-sku-row__item--disabled {
        background: $active-color;
        border-color: $gray-light;
        color: $gray;
      }
    }
  }

  /* sku stepper */
  &-stepper {
    &-stock {
      padding: 12px 0;
      margin-left: 15px;
    }

    &-container {
      height: 30px;
      margin-right: 20px;
    }
  }
  
  &__stepper {
    top: 7px;
    left: 4px;
    float: right;

    &-title {
      float: left;
      line-height: 30px;
      font-size: 14px;
    }
  }

  &__stock {
    display: inline-block;
    margin-right: 10px;
    color: $gray-dark;
    font-size: 12px;
  }
  
  &__quota {
    display: inline-block;
    color: $red;
    font-size: 12px;
  }

  /* sku actions */
  &-actions {
    display: flex;
    margin-top: 10px;
  }
}
